home *** CD-ROM | disk | FTP | other *** search
/ Atari Forever 4 / Atari Forever 4.zip / Atari Forever 4.iso / SERIE_AI / AI_074 / MPLYR215 / SLIDSHOW.DOC < prev   
Text File  |  1998-03-14  |  9KB  |  252 lines

  1. M_PLAYER: SLIDE-SHOWS and MOVIE-MAKER section
  2. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  3.  
  4. How to run a slideshow?
  5. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  6.     Just choose your batch file instead of an animation (please, keep
  7. BAT as the batch extension).
  8.  
  9. How to run a mov-maker?
  10. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  11.     It's the same as before, but the batch file must contain the line
  12. 'o=file_path' to know witch file to create. If you simply clic on 'Go!', it
  13. will act as a slide-show, to get the Mov-Creation, you must use the key
  14. 'Alt' while clicking on the 'Go!' button. Easy, no?
  15.  
  16. How to create a BATCH FILE for a SLIDESHOW?
  17. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  18.  
  19.     A batch file is a simple ascii text files that contains 3 parts:
  20.     - the identifier
  21.     - the header
  22.     - the datas
  23.  
  24.     Only the first line must start ont the leftmost row, for the
  25. others, spaces and tab to indent are allowed, there must be only one
  26. command per line, lines starting with ';' are considered as comments.
  27.     The size of the file is limited to 12488 bytes (I think it's
  28. enough...).
  29.  
  30.     The identifier
  31.     ¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  32.  
  33.     It must be on the first line, first character and is always:
  34.         M_PLAYER or m_player (or m_PlAYer if you prefer!)
  35.  
  36.     The header
  37.     ¨¨¨¨¨¨¨¨¨¨
  38.     Starts on the second line (or after some comments lines) and gives
  39. general infos on the slideshow:
  40.  
  41.     w=xxxx    the width of the movie
  42.     h=xxxx    the height of the movie
  43.     c=xxxx    the compression (the type of file):
  44.             tga2 for TGA 2 uncompressed (24 or 16 bits)
  45.             ximg for IMG with 'XIMG' extension and 256 colors
  46.     b=xxxx    size of the buffer to load the entire largest image file
  47.  
  48.     Those first 4 infos can't be ommited! The following can (for a
  49. slide show, but must appear for a MOV-create):
  50.  
  51.     t=xxxx    time for one frame (number of 1/200sec)
  52.     f=xxxx    number of frames in the whole slideshow
  53.     o=file_path    path and name of the file to create (MOV, RLE16
  54.             or RLE8 compression)
  55.     s=file_path    path and name of the sound file to add to the MOV
  56.             (WAV or AVR, 8/16 bits, mono/stereo)
  57.  
  58.     If 's=' is present, then 't=' is ignored and the frame rate is
  59. computed according to the sound duration.
  60.  
  61.     q=x    quality, default value is 5 (5 bits per color), but you
  62.         can reduce it to 4,3,2 or even 1 to get a more efficient
  63.         compression, but with a lost of quality. I've tried 'q=2'
  64.         on some frames, it seems to be correct (better
  65.         compression, good quality). 'q=' is only useful when a MOV
  66.         is created, it fixes the number of signifiant bits to know
  67.         if the color of a pixel has changed or not.
  68.     k=xxxx    specifies the rate of the key frames (for example, with
  69.         k=5, frames #5, 10, 15, 20 ... will be key frames). See
  70.         below: "Key frames use".
  71.  
  72.     The order of those infos is not fixed, but you musn't put spaces
  73. between the characters (w = 320 is wrong!).
  74.  
  75.     The datas
  76.     ¨¨¨¨¨¨¨¨¨
  77.     Starts immediately after the header with a key word:
  78.     data
  79.  
  80.     Then, every line is read and:
  81.     if starting with a '.' --> it's a command, executes it
  82.     else               --> it's the name of a file, displays it,
  83.                    and its name becomes the current name.
  84.  
  85.     commands are:
  86.     .rept xxxx
  87.     .endr
  88.         repeat xxxx times what's between rept and endr. Loops can
  89.         be nested.
  90.  
  91.     .disp
  92.         displays the file corresponding to the current name
  93.     .getp
  94.         uses the palette of the next file (only applied with
  95.         palette based images). If '.getp' is not specified, then
  96.         the palette will be ignored (for example when all of the
  97.         frames share the same palette that is loaded once), this
  98.         speeds up the display when running in NOVA 256c (because
  99.         the palette must be passsed to the VDI).
  100.     .incr
  101.         increments a number found into the current name (example,
  102.         if name was: C:\IMAGES\FRM00001.TGA it becomes
  103.                  C:\IMAGES\FMR00002.TGA)
  104.     .decr
  105.         same as above with a decrementation.
  106.     .stop
  107.         end of the slideshow. This command MUST appear, else the
  108.         program crashes.
  109.     .keyf
  110.         forces the next frame to be a key-frame (if k=xxxx is
  111.         used, then this auto key counter will be reset). See below
  112.         at "Key frames use".
  113.  
  114. Example of a BATCH FILE:
  115. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  116.     (The comments starting with ** don't appear in the file!)
  117.  
  118. ** start of file
  119. M_Player                        ** Id
  120. ; comes from a FLI            ** comment
  121. w=320                           ** width
  122. h=200                ** height
  123. ; 67/200 means 3 f/s        ** comment
  124. t=67                ** time for one frame
  125. f=29                ** number of frames
  126. c=tga2                ** files are TGA 2 uncompressed
  127. b=192018            ** size of one file (320x200x3 + 18)
  128. data                ** end of header/start of data
  129. E:\imprimer\mou00001.tga    ** first frame, display it
  130. .rept 2                ** twice the whole
  131.   .rept 7            ** 7 times
  132.     .incr            ** increment name of file (00002 to 00008)
  133.     .disp            ** and display it
  134.   .endr                ** loop
  135.   .rept 7            ** another 7 times
  136.     .decr            ** dec name of file (00007 to 00001)
  137.     .disp            ** and display it
  138.   .endr                ** loop
  139. .endr                ** twice!
  140. .stop                ** end of slideshow
  141.  
  142.  
  143.     Well, this example has displayed:
  144.     mou00001.tga
  145.     mou00002.tga
  146.     ...
  147.     mou00007.tga
  148.     mou00008.tga
  149.     mou00007.tga
  150.     ...
  151.     mou00001.tga
  152.     And this twice! The images came from a FLI that I saved using the
  153. Step by Step mode.
  154.  
  155.     INCR and DECR commands can only work correctly if the names of the
  156. files END with digits! (for example 00001BB.TGA won't work because it
  157. ends with BB).
  158.  
  159. Another example:
  160. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  161.     You can specify each file if you don't want to use commands:
  162.  
  163. M_PLAYER
  164. w=184
  165. h=240
  166. b=50000
  167. c=ximg                ** t= ommited because there's a sound
  168. f=5
  169. o=C:\ANIM\US.MOV        ** will create a MOV if Alt+GO
  170. s=C:\SOUNDS\KISS.AVR        ** will add this sound if Alt+GO
  171. data
  172. .getp                ** supposing that all have the same
  173. C:\IMAGES\ME.IMG        ** palette, we load it once!
  174. C:\IMAGES\YOU.IMG
  175. C:\IMAGES\ME.IMG
  176. C:\IMAGES\YOU.IMG
  177. C:\IMAGES\ME_N_YOU.IMG
  178. .stop
  179.  
  180.     '.stop' is the only command that must appear.
  181.  
  182.  
  183. Common errors (those I made...)
  184. ¨¨¨¨¨¨¨¨¨¨¨¨¨
  185.     * The header is built BEFORE adding the frames, so the number of
  186. frames that you specify (f=xxxx) must be exact! Else you'll get a totally
  187. corrupted MOV file. To ensure that it's the right value, launch a
  188. slide-show before encoding, if total_frames=frames_displayed, it's Ok.
  189.     * this is the same for 'w=' and 'h='. Be sure that all of the
  190. images have the same size, the one you specified.
  191.     * the 'supported' message into the graphic box is based upon your
  192. 'c=xxxx'. The program hasn't read a file to verify that, ensure that it's
  193. the good fromat.
  194.     * The sound frequencies accepted are those from the PC world:
  195. 11025, 22050 and 44100 KHz, or the closest possible to them. Else, you get
  196. an 'Unsupported' message in the sound box.
  197.     * if using IMG images you get the RLE8 compression that uses a
  198. palette. But, the MOV can contain only ONE palette, so you must be sure
  199. that all the images share the same colors, else, it's the last palette
  200. read (with .getp) that will be saved.
  201.  
  202. Key-Frames use
  203. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  204.  
  205.     Here is a brief introduction to the utility of inserting
  206. key-frames into a movie. There are two cases:
  207.     - your machine is fast and no frame will be skipped when playing,
  208.     then you don't need to use the key frames.
  209.     - your machine isn't so fast and there may be some frames skipped,
  210.     the use of key-frames is highly recommended!
  211.  
  212.     What happens when a frame is skipped?
  213.  
  214.     In order to increase the compression, only the differencies
  215. between two frames are stored, this means that one frame is only a partial
  216. display. If one frame is skipped (because of the synchronisation) the next
  217. one won't have the background expected! You'll get a wrong display.
  218.  
  219.     A key frame is used to solve this problem, it is a complete
  220. reconstruction of the screen. So, when a frame is skipped, M_PLAYER just
  221. has to wait for the next key-frame to go on displaying.
  222.  
  223.     An example:
  224.  
  225.     Suppose you have used k=5 and t=40 (5 frames per second) into the
  226. header and that your machine can only display 3 images /second. Here is
  227. what will happen:
  228.  
  229.     second #1: frames 1,2,3
  230.     second #2: frames 5,6,7
  231.     second #3: frames 10,11,12
  232.     etc...
  233.  
  234.     Every key frame will be at its exact position (in time), and
  235. between 2 key-frames, the player does as much as it can. If you play this
  236. same movie with a faster machine, you'll get maybe:
  237.     second #1: frames 1,2,3,4
  238.     second #2: frames 5,6,7,8
  239.     second #3: frames 10,11,12,13
  240.     etc...
  241.     And with a very fast machine, you'll get every frame.
  242.  
  243.     The best is to put 2 key-frames per second, this way, the display
  244. will be synchro with the sound twice a second.
  245.  
  246.     You must know that a key frame is larger than a normal one,
  247. because it rebuilds every pixel, and that inserting too few key-frames
  248. will lead to a poor synchro quality. It's a question of balance. Make some
  249. tests to find the best solution.
  250.  
  251.     Idea: it's a good idea to choose the frames where the background
  252. changes suddenly, because anyway most of the pixels will be rebuilt!